<template>
  <view class="content">
    <view class="box">
      <view class="name">默认状态</view>
      <view class="desc"></view>
      <kt-button>登录</kt-button>
    </view>
    <view class="box">
      <view class="name">默认状态</view>
      <view class="desc"></view>
      <kt-button
          @click="clickBtn()"
          ref="btn2">登录</kt-button>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    /**
     * 点击按钮
     */
    clickBtn() {
      this.$refs.btn2.loading();
      setTimeout(() => {
        this.$refs.btn2.success("登录成功")
      }, 2000);
    }
  },
}
</script>

<style lang="scss" scoped>
.content{
  padding: 30rpx;
}

.box{
  padding: 20rpx;
}

.name{
  margin-top: 20rpx;
  font-size: 30rpx;
  font-weight: bold;
  text-align: center;
}


</style>
